<template>
  <div class='prize-alert pa' v-if="$store.state.dialogs.prizealert.show" @click="$store.state.dialogs.prizealert.show=false">
    <div class="prize-alert-bac pa">
      <p><img :src="imgs.close" alt="" class="prize-close fr"></p>
      <p class="prize-title pa"><img v-show="$store.state.dialogs.prizealert.type!=0" :src="$store.state.dialogs.prizealert.type==1?imgs.face:imgs.face_no" alt=""><span>{{$store.state.dialogs.prizealert.type==1?'恭喜，中奖啦！':$store.state.dialogs.prizealert.type==0?'抽奖规则':'很遗憾，差一点！'}}</span></p>
      <p class="prize-content pa" v-html="$store.state.dialogs.prizealert.content">{{$store.state.dialogs.prizealert.content}}</p>
      <img v-show="$store.state.dialogs.prizealert.type==1" :src="imgs.bac" alt="" class="pr">
      <p class="btn pa">我知道啦</p>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  name: "",
  data() {
    return {
      imgs:{
        face:require('../../../assets/img/hpmepage/newuser/face1.png'),//有奖
        face_no:require('../../../assets/img/hpmepage/newuser/face2.png'),//无奖
        bac:require('../../../assets/img/hpmepage/newuser/bac2.png'),
        close:require('../../../assets/img/hpmepage/newuser/close.png')
      }
    };
  },
  methods: {},
  created() {}
};
</script>
<style lang="scss" scoped>
.prize-alert {
  top: 0;
  left: 0;
  z-index: 100;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.36);
  transition: all .8s;

  .prize-alert-bac{
    left: 60px;
    top: 50%;
    width: calc(100% - 120px);
    transform: translateY(-50%);
    height: 170px;
    border-radius: 10px;
    background-color: #fff;

    img{
      width: 90%;
      z-index: 1;
      margin-left: 5%;
    }

    .prize-close{
      width: 20px;
      transform: translate(-5px,5px);
    }
    .btn{
      height: 40px;
      line-height: 40px;
      width: 80%;
      text-align: center;
      color: #fff;
      border-radius: 40px;
      margin-left: 10%;
      font-size: 14px;
      background:linear-gradient(left,#fc3d2e,rgb(239, 117, 16));
      bottom: 15px;
      z-index: 0
    }
    .prize-title{
      z-index: 0;
      top: 30px;
      width: 100%;
      text-align: center;

      img{
        display: inline-block;
        width: 20px;
        vertical-align: middle;
        margin-right: 5px;
      }
      span{
        vertical-align: middle;
      }
    }
    .prize-content{
      width: 100%;
      text-align: center;
      top: 45%;
      transform: translateY(-50%);
      color: #999;
    }
  }
}
</style>